package com.lin.mapper;

import com.lin.entity.DynamicEntity;
import com.lin.entity.vo.DynamicEntityVO;
import com.lin.entity.vo.MusicVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DynamicMapper {
    /**
     * 根据用户id查询发布的动态信息
     *
     * @param userId
     * @return
     */
    @Select("select * from dynamic where user_id = #{userId}")
    List<DynamicEntity> getdynamic(Integer userId);

    @Select("select * from dynamic where id = #{id}")
    DynamicEntityVO getDynamicDetail(Integer id);

    void updatedynamicEntity(DynamicEntityVO dynamicEntityVO);

    /**
     * //根据userId查询动态数量
     * @param userId
     * @return
     */

}
